
<div class="block_slides container_wrapper">
    <div class="block_slides_content">
        {%- for block in section.blocks -%}
        <div class="slides_item {% if forloop.first == true %}active{% endif %} {% if section.blocks.size == 1 %}one_item{% endif %}">
			{%- if block.btn_text == "" -%}
              <a href="{{block.link | setUrlDataFrom:data_from}}" style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;z-index:100"></a>
            {%- endif -%}
            <div class="slides_item-img">
								{% include 'lazy_img',  src:block.pc_image.src, file_type:"banner", class:"pc_img",  alt:block.pc_image.alt,attr: 'data-crop-type="none"' %}
								{% assign mobile_image_src = block.mebile_image.src|default:block.pc_image.src %}
								{% include 'lazy_img',  src:mobile_image_src, file_type:"banner", class:"mobile_img",  alt:block.mebile_image.alt,attr: 'data-crop-type="none"' %}
                <div class="subtitle">{{block.sub_title}}</div>
            </div>
            <div class="mask" style="--mask-bg:{{block.mask_bg}};--mask-opt: {{block.mask_opt}}%"></div>
            <div class="slides_item-text">
                <div class="slides_item-text-box">
                    <h2 class="slides_item-title" style="--title-color: {{block.title_color}}">{{block.title}}</h2>
                    <div class="slides_item-detail" style="--detail-color: {{block.detail_color}}">{{ block.detail|html_content_filter }}</div>
                    {%- if block.btn_text != '' -%}
						<div class="animation_btn">
							<a href="{{ block.link | setUrlDataFrom:data_from}}" class="main_btn">
								<span>{{block.btn_text}}</span>
								<svg viewBox="0 0 22 14" fill="none" aria-hidden="true" focusable="false" role="presentation"
									class="icon icon-button-arrow" xmlns="http://www.w3.org/2000/svg">
									<path
										d="M15.1712 1.15214L14.9895 0.98149L14.8183 1.16262L14.3286 1.68074L14.1561 1.86323L14.3393 2.03491L18.9951 6.39689L1 6.3969L0.75 6.3969L0.75 6.6469L0.75 7.35665L0.75 7.60665L1 7.60665L18.9955 7.60665L14.3393 11.9722L14.1549 12.1451L14.3298 12.3276L14.8195 12.8386L14.9907 13.0173L15.1711 12.8479L21.2041 7.18404L21.3981 7.00183L21.2041 6.81956L15.1712 1.15214Z"
										fill-rule="evenodd" clip-rule="evenodd" fill="currentColor"></path>
								</svg>
							</a>
						</div>
                    {%- endif -%}
                </div>
            </div>
        </div>
        {%- endfor -%}
    </div>
</div>


<script type="text/javascript">
(function(){$('.block_slides .slides_item').on('mouseenter', function(e) {
    $(this).addClass('active').siblings().removeClass('active');
})})()
</script>
{% schema %}
{
	"tag": "",
	"class": "block_slides",
	"icon": "icon-lunbotu",
	"is_global": false,
	"name": {
		"zh_CN": "轮播",
		"en_US": "Slide"
	},
	"max_blocks": "6",
	"settings": [
		{
			"type": "card_header",
			"label": {
				"zh_CN": "设置",
				"en_US": "Settings"
			}
		}
	],
	"blocks": [
		{
			"name": {
				"zh_CN": "轮播图片",
				"en_US": "Slide image"
			},
			"type": "slide-item",
			"settings": [
				{
					"type": "card_image",
					"label": {
						"zh_CN": "PC端图片",
						"en_US": "Image on PC"
					},
					"default": {
						"src": "",
						"alt": ""
					},
					"info": {
						"zh_CN": "建议尺寸（宽*高）：1480*996px",
						"en_US": "Suggested size (W * H) : 1480*996px"
					},
					"id": "pc_image"
				},
				{
					"type": "card_image",
					"label": {
						"zh_CN": "移动端图片",
						"en_US": "Mobile image"
					},
					"default": {
						"src": "",
						"alt": ""
					},
					"info": {
						"zh_CN": "建议尺寸（宽*高）：1242*1258px",
						"en_US": "Suggested size (W * H) : 1242*1258px"
					},
					"id": "mebile_image"
				},
				{
					"type": "card_input",
					"label": {
						"zh_CN": "标题",
						"en_US": "Title"
					},
					"id": "title",
					"default": ""
				},
				{
					"type": "card_text_editor",
					"label": {
						"zh_CN": "简短描述",
						"en_US": "Short description"
					},
					"id": "detail",
					"default": "titles and images"
				},
				{
					"type": "card_input",
					"label": {
						"zh_CN": "二级标题",
						"en_US": "Secondary title"
					},
					"id": "sub_title",
					"default": "New Arrivals"
				},
				{
					"type": "card_input",
					"label": {
						"zh_CN": "按钮文字",
						"en_US": "Button text"
					},
					"id": "btn_text",
					"default": ""
				},
				{
					"type": "card_page_link",
					"label": {
						"zh_CN": "跳转链接",
						"en_US": "Jump links"
					},
					"default": {
						"type": "",
						"title": "",
						"url": ""
					},
					"id": "link"
				},
				{
					"type": "card_color",
					"id": "title_color",
					"label": {
						"zh_CN": "标题颜色",
						"en_US": "Header color"
					},
					"default": "#fff"
				},
				{
					"type": "card_color",
					"id": "detail_color",
					"label": {
						"zh_CN": "描述颜色",
						"en_US": "Describe color"
					},
					"default": "#dbd6d2"
				},
				{
					"type": "card_color",
					"id": "mask_bg",
					"label": {
						"zh_CN": "蒙层颜色",
						"en_US": "Mask color"
					},
					"default": "#000"
				},
				{
					"type": "card_slider",
					"label": {
						"zh_CN": "蒙层透明度",
						"en_US": "Mask transparency"
					},
					"id": "mask_opt",
					"max": 100,
					"min": 0,
					"unit": "%",
					"default": 0
				}
			]
		}
	],
	"default": {
		"settings": {},
		"blocks": [
			{
				"pc_image": {
					"src": "",
					"alt": ""
				},
				"mebile_image": {
					"src": "",
					"alt": ""
				},
				"title": "Beautifully animated",
				"detail": "titles and images",
				"sub_title": "New Arrivals",
				"btn_text": "Shop now",
				"link": {
					"type": "",
					"title": "",
					"url": ""
				},
				"title_color": "#fff",
				"detail_color": "#dbd6d2",
				"mask_bg": "#000",
				"mask_opt": 0,
				"block_type": "slide-item"
			},
			{
				"pc_image": {
					"src": "",
					"alt": ""
				},
				"mebile_image": {
					"src": "",
					"alt": ""
				},
				"title": "Beautifully animated",
				"detail": "titles and images",
				"sub_title": "New Arrivals",
				"btn_text": "Shop now",
				"link": {
					"type": "",
					"title": "",
					"url": ""
				},
				"title_color": "#fff",
				"detail_color": "#dbd6d2",
				"mask_bg": "#000",
				"mask_opt": 0,
				"block_type": "slide-item"
			},
			{
				"pc_image": {
					"src": "",
					"alt": ""
				},
				"mebile_image": {
					"src": "",
					"alt": ""
				},
				"title": "Beautifully animated",
				"detail": "titles and images",
				"sub_title": "New Arrivals",
				"btn_text": "Shop now",
				"link": {
					"type": "",
					"title": "",
					"url": ""
				},
				"title_color": "#fff",
				"detail_color": "#dbd6d2",
				"mask_bg": "#000",
				"mask_opt": 0,
				"block_type": "slide-item"
			}
		]
	}
}
{% endschema %}